<?php
require('config.php');

        $user_id=$_REQUEST['user_id'];
        $orderId=$_REQUEST['orderId'];
        //$user_id=9;
		$sql="select * from `".$oto."_orders` as o,`".$oto."_order_goods` as g where o.userId='".$user_id."' and `orderFlag`='1' and o.orderId=g.orderId and o.orderType in ('4','5') and o.orderId='{$orderId}'";
		//file_put_contents("tsxx.txt", "\r\n".$sql."\r\n", FILE_APPEND);
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$jf_jilu_xx[]=$row;//将取得的所有数据赋值给person_info数组
		}
		$sql="select trackNumber,".$oto."_express.expressCompany,".$oto."_order_express.id from `".$oto."_order_express`,`".$oto."_express` where ".$oto."_order_express.orderId='$orderId' and ".$oto."_order_express.exId=".$oto."_express.id";
		//file_put_contents("tsxx.txt", "\r\n".$sql."\r\n", FILE_APPEND);
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$wuliu[]=$row;//将取得的所有数据赋值给person_info数组
		}
		if(!isset($wuliu))
		{
			$jf_jilu_xx[0]['wl_gs']='无';
			$jf_jilu_xx[0]['wl_dd']='无';
			$jf_jilu_xx[0]['wl_no']='无';
		}
		else
		{
			$jf_jilu_xx[0]['wl_gs']=$wuliu[0]['expressCompany'];
			$jf_jilu_xx[0]['wl_dd']=$wuliu[0]['trackNumber'];
			$jf_jilu_xx[0]['wl_no']=$wuliu[0]['id'];
		}
		echo json_encode($jf_jilu_xx);
?>